/*
 * 创建日期 2009-11-26
 *
 * 成都天和软件公司
 * 电话：028-85425861
 * 传真：028-85425861-8008
 * 邮编：610041 
 * 版权所有
 */
package  org.fantasy.common.db.bean;

import java.util.LinkedHashMap;




/**
 * 报表中的一行
 * @author: 王文成
 * @version: 1.0
 * @since 2009-11-26
 */
public class ReportRow extends Row {
    
    private boolean isSumTotal;
    
    private boolean isSubTotal;
    
    /**
     * 统计的列(该属性仅对小计合计有效)
     */
    private String statCol;
    
    public ReportCell getReportCell(String name) {
        ReportCell cell = (ReportCell)get(name);
        if( cell == null ){
            cell = new ReportCell();
            cell.setName(name);
            put(name,cell);
        }
        return cell;
    }

    public boolean isSubTotal() {
        return isSubTotal;
    }

    public void setSubTotal(boolean isSubSum) {
        this.isSubTotal = isSubSum;
    }

    public boolean isSumTotal() {
        return isSumTotal;
    }

    public void setSumTotal(boolean isSum) {
        this.isSumTotal = isSum;
    }
    
    public String getStatCol() {
        return statCol;
    }

    public void setStatCol(String statCol) {
        this.statCol = statCol;
    }

    @Override
    @SuppressWarnings("all")
    public ReportRow clone(){
        ReportRow row = new ReportRow();
        row.rowMap = (LinkedHashMap<Object,Object>)rowMap.clone();
        return row;
    }

    @Override
    public String toString() {
        return rowMap.toString();
    }
}